
import {userInfo} from "network/homeRequest/HomeRequest";

import * as Methods from "../methods.const";

const state = {

  userInfo:null,
};


const mutations = {

    [Methods.SAVE_USER_INFO](state,userInfo){

      state.userInfo = userInfo;
    }

}

const actions = {

   [Methods.GET_USER_INFO](content){

     return new Promise((resolve, reject) => {

       userInfo({}).then(data=>{

         content.commit(Methods.SAVE_USER_INFO,data);
         resolve(data);
       }).catch(error=>{


       });

     });
  }
}

export default {

  state,
  mutations,
  actions
}
